//
//  RTCNetWorkingManager.h
//  YouinRTC
//
//  Created by 潘欣 on 2022/8/20.
//

#import <Foundation/Foundation.h>
#import "RYSingletonMacro.h"
#import <AFNetworking/AFNetworking.h>
NS_ASSUME_NONNULL_BEGIN
// 请求进度
typedef void (^RYNSProgress) (NSProgress *progress);
// 请求成功
typedef void (^successBlock) (id content);
// 请求失败
typedef void (^requestFailure)(NSError *error);

@interface RTCNetWorkingManager : NSObject

/**
 创建一个单例的对象
 */
RYSingletonH(RTCNetWorkingManager)


- (void)requestPost:(NSString *)urlString params:(NSDictionary *_Nullable)params header:(NSDictionary * _Nullable)header success:(successBlock)success failure:(requestFailure)failure;

- (void)requestGet:(NSString *)urlString paramars:(NSDictionary *_Nullable)paramars header:(NSDictionary *_Nullable)header success:(successBlock)success failure:(requestFailure)failure;

- (void)requestUpLoadFile:(NSData *)data withUrl:(NSString *)urlString params:(NSDictionary *_Nullable)params header:(NSDictionary *_Nullable)header progress:(RYNSProgress)progress success:(successBlock)success failure:(requestFailure)failure;
@end

NS_ASSUME_NONNULL_END
